package com.axzhengxin.platform.business.service.impl;

import java.util.List;

import com.axzhengxin.platform.business.domain.BizRoomInfo;
import com.axzhengxin.platform.business.mapper.BizRoomInfoMapper;
import com.axzhengxin.platform.business.service.IBizRoomInfoService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 房抵贷信息Service业务层处理
 * 
 * @author axzhengxin
 * @date 2021-04-01
 */
@Service
public class BizRoomInfoServiceImpl implements IBizRoomInfoService
{
    @Autowired
    private BizRoomInfoMapper bizRoomInfoMapper;

    /**
     * 查询房抵贷信息
     * 
     * @param roomId 房抵贷信息ID
     * @return 房抵贷信息
     */
    @Override
    public BizRoomInfo selectBizRoomInfoById(String roomId)
    {
        return bizRoomInfoMapper.selectBizRoomInfoById(roomId);
    }

    /**
     * 查询房抵贷信息列表
     * 
     * @param bizRoomInfo 房抵贷信息
     * @return 房抵贷信息
     */
    @Override
    public List<BizRoomInfo> selectBizRoomInfoList(BizRoomInfo bizRoomInfo)
    {
        return bizRoomInfoMapper.selectBizRoomInfoList(bizRoomInfo);
    }

    /**
     * 新增房抵贷信息
     * 
     * @param bizRoomInfo 房抵贷信息
     * @return 结果
     */
    @Override
    public int insertBizRoomInfo(BizRoomInfo bizRoomInfo)
    {
        bizRoomInfo.setCreateTime(DateUtils.getNowDate());
        return bizRoomInfoMapper.insertBizRoomInfo(bizRoomInfo);
    }

    /**
     * 修改房抵贷信息
     * 
     * @param bizRoomInfo 房抵贷信息
     * @return 结果
     */
    @Override
    public int updateBizRoomInfo(BizRoomInfo bizRoomInfo)
    {
        bizRoomInfo.setUpdateTime(DateUtils.getNowDate());
        return bizRoomInfoMapper.updateBizRoomInfo(bizRoomInfo);
    }

    /**
     * 批量删除房抵贷信息
     * 
     * @param roomIds 需要删除的房抵贷信息ID
     * @return 结果
     */
    @Override
    public int deleteBizRoomInfoByIds(String[] roomIds)
    {
        return bizRoomInfoMapper.deleteBizRoomInfoByIds(roomIds);
    }

    /**
     * 删除房抵贷信息信息
     * 
     * @param roomId 房抵贷信息ID
     * @return 结果
     */
    @Override
    public int deleteBizRoomInfoById(String roomId)
    {
        return bizRoomInfoMapper.deleteBizRoomInfoById(roomId);
    }
}
